Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix LazyServiceFactory to handle exception in constructor #249

Closed
wants to merge 1 commit into from

Conversation

idsulik
Copy link

@idsulik idsulik commented Dec 11, 2024

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

This PR fixes a bug where exceptions thrown during lazy service initialization would leave the proxy in an invalid state. The fix ensures that the original initializer is restored when an exception occurs, allowing subsequent initialization attempts to work correctly.
Added tests to verify the behavior.

p.s. thanks to @vdmorozov, he found the issue

@idsulik
Copy link
Author

idsulik commented Dec 11, 2024

if it's possible, please create a patch release for the 3 version with this fix

@idsulik idsulik force-pushed the fix-lazyservicefactory branch 2 times, most recently from 0edf3b9 to 6523add Compare December 11, 2024 12:27
@idsulik idsulik force-pushed the fix-lazyservicefactory branch from 6523add to 3cd80a2 Compare December 11, 2024 12:34
@idsulik
Copy link
Author

idsulik commented Dec 11, 2024

@vdmorozov will create a separate PR

@idsulik idsulik closed this Dec 11, 2024
@idsulik idsulik deleted the fix-lazyservicefactory branch December 11, 2024 13:02
@vdmorozov
Copy link

Here: #250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants